/*
 * lab10B3.c
 * CSIS 248 Lab #10
 */
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>

int main() {
	int fin = open( "inputf", O_RDONLY );
	int fout = open( "outputf", O_WRONLY|O_CREAT, S_IRUSR);
	int result;
	do {
		char t=' ';
		result = read( fin, &t, 1 );
		if (result != 1) break;
		result = write( fout, &t, 1 );
	} while(result == 1);
	return 0;
}
